<template>
  <div>
    <van-tabs v-model="timeChange" color="#1890ff">
      <van-tab title="月度"></van-tab>
      <van-tab title="年度"></van-tab>
    </van-tabs>
    <van-cell center title="是否包含阿里企业">
      <template #right-icon>
        <van-switch v-model="isIncludeAli" size="24" />
      </template>
    </van-cell>
    <van-cell center title="是否包含房地产">
      <template #right-icon>
        <van-switch v-model="isIncludeAli" size="24" />
      </template>
    </van-cell>
    <div class="table">
      <div class="tr bg-w">
        <div class="th">名次</div>
        <div class="th">园区</div>
        <div class="th">企业</div>
        <div class="th">金额</div>
      </div>
      <div v-for="(item,index) in listData" :key="index">
        <div class="tr bg-g" v-if="index % 2 == 0">
          <div class="td">{{item.code}}</div>
          <div class="td">{{item.park}}</div>
          <div class="td">{{item.company}}</div>
          <div class="td">{{item.type+'万'}}</div>
        </div>
        <div class="tr" v-else>
          <div class="td">{{item.code}}</div>
          <div class="td">{{item.park}}</div>
          <div class="td">{{item.company}}</div>
          <div class="td">{{item.type+'万'}}</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      timeChange: 0,
      isIncludeAli: true,
      listData: [
        
      ],
    };
  },
  created() {
    for(var i =1;i<51;i++){
      this.listData.push({code:i, park: "181社区",company:"润湾", type: "3000" })
    }
  },
  methods: {},
};
</script>

<style scoped lang="less">
.table {
  border: 0px solid darkgray;
}
.tr {
  display: flex;
  width: 100%;
  justify-content: center;
  height: 30px;
  align-items: center;
}
.td {
  width: 40%;
  justify-content: center;
  text-align: center;
}
.td:nth-child(1){
  width: 15%;
}
.td:nth-child(2){
  width: 65%;
}
.td:nth-child(3){
  width: 20%;
}
.bg-w {
  background: snow;
}
.bg-g {
  background: #e6f3f9;
}
.th {
  width: 40%;
  justify-content: center;
  background: #49a9ee;
  color: #fff;
  display: flex;
  height: 30px;
  align-items: center;
}
.th:nth-child(1){
  width: 15%;
}
.th:nth-child(2){
  width: 65%;
}
.th:nth-child(3){
  width: 20%;
}
</style>
